let a =[],b=[1,2,3]

console.log(b.sort((a,b)=>a-b));
